package com.chenyun.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 行政区划表(sys_region)表实体类
 *
 * @author Lonni
 * @since 2020-11-23 15:26:24
 */
@TableName("sys_region")
@ApiModel(value = "SysRegion对象", description = "行政区划表")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysRegion implements Serializable {

    private static final long serialVersionUID = -2276692656615375562L;
    @TableId(type = IdType.NONE)
    private String code;
    private String name;
    private String pCode;
    private String level;
    @TableField(exist = false)
    private List<SysRegion> children = new ArrayList<SysRegion>();

}